const getIds = (tree: any[], child: string) => {
  const ids: string[] = [];
  tree?.forEach((item) => {
    ids.push(item.id);
    if (item[child]) {
      ids.push(...getIds(item[child], child));
    }
  });
  return ids;
};
export const addIdsToTree = (tree?: any[], child = "childs") => {
  if (tree) {
    tree.forEach((node) => {
      // 创建新的ids数组，包含父节点的ids和当前节点的id
      // 为当前节点添加ids属性
      node.ids = [node.id, ...getIds(node[child], child)];
      // 如果当前节点有子节点，递归调用addIdsToTree
      if (node[child]) {
        addIdsToTree(node[child], child);
      }
    });
  }
};

export const getPageItem = (route: any) => {
  const { app } = useApp();
  return app.value.menus[0];
};

export const getCrumbsList = () => {
  
}





